home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / misc / xref_v1.1.lha / XRef / ARexx / StrToRDArgs < prev    next >
Encoding:
Text File  |  1994-09-02  |  960 b   |  50 lines

  1. /*
  2. ** $PROJECT: arexx external function
  3. **
  4. ** $VER: StrToRDArgs 1.1 (02.09.94)
  5. **
  6. ** by
  7. **
  8. ** Stefan Ruppert , Windthorststraße 5 , 65439 Flörsheim , GERMANY
  9. **
  10. ** (C) Copyright 1994
  11. ** All Rights Reserved ! 
  12. **
  13. ** Place this script in your REXX: directory and just use it like this :
  14. **
  15. ** rdargsstring = StrToRDArgs(mystring)
  16. **
  17. **
  18. ** NOTE:
  19. **
  20. ** Don't add the suffix ".rexx" to this file ! Because many applications
  21. ** have own rexx suffix's like GoldED has ".ged" or CygnusEd has ".ced",
  22. ** they couldn't found a ".rexx" script !
  23. **
  24. ** This code is based on some arexx macros from Alexander Barthel
  25. **
  26. ** $HISTORY:
  27. **
  28. ** 02.09.94 : 001.001 :  initial
  29. */
  30.  
  31. /* convert string to a RDArgs suitable string */
  32.  
  33. PARSE ARG str
  34.  
  35. if str ~= '' then do
  36.  help = str
  37.  str = ''
  38.  do i = 1 to length(help)
  39.    char = substr(help, i, 1)
  40.    if char = '*' then
  41.      char = '**'
  42.    if char = '"' then
  43.      char = '*"'
  44.    str = insert(char, str, length(str))
  45.  end
  46. end
  47. exit str
  48.  
  49.  
  50.